<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>商品列表</title>
</head>
<body>
<h1>商品列表</h1>
<table border="1">
    <tr>
        <th>ID</th>
        <th>名称</th>
        <th>价格</th>
        <th>类别</th>
        <th>创建时间</th>
        <th>更新时间</th>
    </tr>
    <%
        java.util.List<org.example.shoppingsystem.model.Product> products = (java.util.List<org.example.shoppingsystem.model.Product>) request.getAttribute("products");
        if (products != null) {
            for (org.example.shoppingsystem.model.Product product : products) {
    %>
    <tr>
        <td><%= product.getId() %></td>
        <td><%= product.getName() %></td>
        <td><%= product.getPrice() %></td>
        <td><%= product.getCategory() %></td>
        <td><%= product.getCreateTime() %></td>
        <td><%= product.getUpdateTime() %></td>
    </tr>
    <%
            }
        }
    %>
</table>
</body>
</html>
